{if $is_ajax eq 0}
<div class="list">
	<div class="list_title clearfix">
		<div class="cur"><a href="{url x="index" r="uc_account#paypassword"}">{$LANG.UC_PAYPASSWORD}</a></div>
	</div>
	<div class="uc_r_bl_box clearfix">
	<div class="blank"></div>
	<div class="inc wb">
{/if}
		<div class="inc_main">
			<div class="tip-h clearfix">
				<div class="lh22 f14" style="margin-bottom:20px;padding-left:102px;padding-top:50px;">
					{if $user_info.paypassword eq ''}
	                <p>尚未设置支付密码</p>
					<div class="blank1"></div>
	                <p>若您希望设置支付密码，请输入以下信息：</p>
					{else}
	                <p>已设置支付密码</p>
					<div class="blank1"></div>
	                <p>若您希望重新设置支付密码，请输入以下信息：</p>
					{/if}
	            </div>
				<form method="post" name="bind_mobile" id="j_bind_mobile_0">
				<table width="470" border="0" style="padding:0;margin:0 auto;">
	                <tbody>
	                <tr>
	                    <td width="70">
	                        <div align="left" class="f14">支付密码：</div>
	                    </td>
	                    <td>
	                        <input type="password" id="J_Vpaypassword" name="paypassword" class="f-input">
	                    </td>
	                    <td height="35" colspan="2" class="f_gray">
	                       
	                    </td>
	                </tr>
					<tr>
	                    <td width="70">
	                        <div align="left" class="f14">确认密码：</div>
	                    </td>
	                    <td>
	                        <input type="password" id="J_Vrpaypassword" name="repaypassword" class="f-input">
	                    </td>
	                    <td height="35" colspan="2" class="f_gray">
	                       
	                    </td>
	                </tr>
					<tr>
						<td class="f14">手机号：</td>
						<td>{function name="hideMobile" v=$user_info.mobile}</td>
						<td><input type="button" id="reveiveActiveCode" class="reveiveActiveCode" value="{$LANG.DO_SEND}{$LANG.MOBILE_VERIFY_CODE}" onclick="sendPhoneCode0(this,'#J_Vphone_0');"></td>
					</tr>
	                <tr>
	                    <td>
	                        <div align="left" class="f14"> {$LANG.VERIFY_CODE}：</div>
	                    </td>
	                    <td>
	                        <input name="validateCode_0" id="validateCode_0" class="f-input">
	                    </td>
	                    <td class="f_gray f14" style="padding-left:10px; width:200px">请输入您获取的手机验证码</td>
	                </tr>
	                <tr style="margin-top:20px;">
	                    <td></td>
	                    <td colspan="2">
	                        <div style="font-weight:bold; margin-top:20px;">
	                            <input type="submit" name="submit" value="{$LANG.SUBMIT_FORM}" class="sub_btn">
	                        </div>
	                    </td>
	                </tr>
	            	</tbody>
				</table>
				</form>
			</div>
		</div>
		<div class="inc_foot"></div>
		{if $is_ajax eq 0}
	</div>
	</div>
</div>
{/if}
<script type="text/javascript">
	jQuery(function(){
		$("#j_bind_mobile_0").submit(function(){
			if($.trim($("#J_Vpaypassword").val())==""){
				$.showErr("请输入支付密码");
				return false;
			}
			if($.trim($("#J_Vpaypassword").val())!=$.trim($("#J_Vrpaypassword").val())){
				$.showErr("确认密码错误");
				return false;
			}
			if($.trim($("#validateCode_0").val())==""){
				$.showErr("请输入验证码");
				return false;
			}
			var query = new Object();
			query.ctl = 'ajax';
			query.act = 'check_paypwd_verify_code';
			query.paypassword = FW_Password($("#J_Vpaypassword").val());
			query.verify = $("#validateCode_0").val();
			query.ajax = 1;
			$.ajax({
				url : APP_ROOT+"/index.php",
				data:query,
				type:"post",
				dataType:"json",
				success: function(obj){
					if(obj.status)
					{			
						$.showSuccess(obj.info,function(){
							window.location.reload();
						});
					}
					else
						$.showErr(obj.info);
				},
				error:function(ajaxobj)
				{
					/*if(ajaxobj.responseText!='')
					alert(ajaxobj.responseText);*/
				}
			});
			return false;
		});
	});
</script>